package ai.assist.common.dto.admin;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

/**
 * 用户
 *
 * @version V1.0
 */
@Data
@ApiModel
public class ModifySysUserDTO implements Serializable {

    @ApiModelProperty("更新时传")
    private String id;

    @NotBlank(message = "账号不能为空")
    private String username;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("旧密码")
    private String oldPwd;

    @ApiModelProperty("新密码")
    private String newPwd;

    @ApiModelProperty("手机号")
    private String phone;

    @ApiModelProperty("真实姓名")
    private String realName;

    @ApiModelProperty("昵称")
    private String nickName;

    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("状态：1正常，2禁用")
    private Integer status;

    @ApiModelProperty("性别")
    private Integer sex;

    @ApiModelProperty("部门id")
    private Long deptId;

    public Long getDeptId() {
        if (deptId == null) {
            deptId = 1L;
        }
        return deptId;
    }

    @ApiModelProperty("是否部门管理员1是0否")
    private Integer deptManager;

    @ApiModelProperty("是否删除 0 未删除，1删除")
    private Integer deleted;

    @ApiModelProperty("角色id")
    private List<String> roleIds;

}
